<?=$system_message;?>
<div class="panel">Profile Update Requests</div>

<?if($request):?>
	<div class="table-responsive">
		<table class="table">
			<tr>
				<th>Request Date</th>
				<th>Student Fullname</th>
				<th>Level</th>
				<th>Status</th>
				<th>Reason</th>
				<th></th>
			</tr>
			<?foreach ($request as $k => $v):?>

				<?
					$color = $v->status == "PENDING" ? "gray" : ($v->status == "DENIED" ? "red" : "green");
				?>
				<tr>
					<td><?=date('m-d-Y', strtotime($v->created))?></td>
					<td><strong><?=ucwords($v->fullname)?></strong></td>
					<td><?=$v->level_desc?></td>
					<td style="color:<?=$color?>;font-weight: bold" ><?=$v->status?></td>
					<td><?=$v->reason?></td>
					<td>
						<a href="<?=site_url('guardian/profile_update_request/'.__link($v->enrollment_id).'/'.__link($v->id))?>" class="confirm" title="View?"><span class="icon icon-eye-open"></span></a>
						<?if($v->status == "PENDING"):?>
							<a href="<?=site_url('guardian/remove_profile_request/'.__link($v->id))?>" class="confirm" title="Remove request?"><span class="icon icon-remove"></span></a>
						<?endif;?>
					</td>
				</tr>
			<?endforeach;?>
		</table>
	</div>
<?else:?>
	<div class="alert-box">No request available found.</div>
<?endif;?>